package com.ybbase.framework.model.po.flow;

import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import java.time.LocalDate;
import com.baomidou.mybatisplus.annotation.TableId;
import java.io.Serializable;

import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import java.util.Date;

/**
 * <p>
 * 流程实例记录表
 * </p>
 *
 * @author cg
 * @since 2019-12-04
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("act_instance_record")
@ApiModel(value="InstanceRecord对象", description="流程实例记录表")
public class InstanceRecord extends Model<InstanceRecord> {

    private static final long serialVersionUID=1L;

    @ApiModelProperty(value = "唯一编码 : 唯一编码")
    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    @ApiModelProperty(value = "流程模型id : 流程模型id")
    private String modelId;

    @ApiModelProperty(value = "流程运行实例id : 流程运行实例id")
    private String runProcessInstanceId;

    @ApiModelProperty(value = "流程运行定义实例id : 流程运行定义实例id")
    private String runDefinitionId;

    @ApiModelProperty(value = "流程启动人 : 流程启动人")
    private Integer userId;

    @ApiModelProperty(value = "流程启动人姓名 : 流程启动人姓名")
    private String userName;

    @ApiModelProperty(value = "流程启动部门 : 流程启动部门")
    private Integer organId;

    @ApiModelProperty(value = "流程启动部门名称 : 流程启动部门名称")
    private String organName;

    @ApiModelProperty(value = "流程启动时间 : 流程启动时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date startTime;

    @ApiModelProperty(value = "流程结束时间 : 流程结束时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date endTime;

    @ApiModelProperty(value = "关联业务的流程名称 : 关联业务的流程名称")
    private String businessName;

    @ApiModelProperty(value = "是否挂起 : 0未挂起 1已挂起")
    private Integer isSuspended;

    @ApiModelProperty(value = "是否结束 : 0未结束1已结束")
    private Integer isFinish;

    @ApiModelProperty(value = "版本 : 版本")
    private Integer version;

    @ApiModelProperty(value = "历史流程实例id : 历史流程实例id")
    private String hisProcessInstanceId;

    @ApiModelProperty(value = "关联业务代码 : 关联业务代码")
    private String businessCode;

    @ApiModelProperty(value = "关联业务id : 关联业务id")
    private String businessId;


    @Override
    protected Serializable pkVal() {
        return this.id;
    }

}
